#ifndef _CAVE_H_
#define _CAVE_H_

enum {
  MAP_W = 50,
  MAP_H = 40
};

struct _coord{
  int x, y;
};
 
struct _rect {
  gboolean done_split_v;
  gboolean done_split_h;
  int lx, ly, hx, hy;
  struct _room *room;
};

struct _couple {
  int v_or_h;
  struct _rect *rect0, *rect1; 
  struct _coord couner0, couner1;
};

struct _room {
  int lx, ly, hx, hy;
  gboolean route;
  gboolean monsterhouse;
};

struct _map {
  gboolean pass;
  gboolean waynavi;
  gboolean passed;
  gboolean disturb;
  struct _room *room;
};

struct _cave {
  struct _map map[MAP_W][MAP_H];
  GList *rect_list;
  GList *couple_list;
  GList *room_list;
};

void cave_generate_tutorial(struct _cave *c);
void cave_free(struct _cave *c);
void cave_generate(struct _cave *c);
#endif
